FROM openjdk:8-jdk-alpine
LABEL maintainer="zhuzhiping (alusiaor@gmail.com)"

ENV TZ=Asia/Shanghai
RUN echo http://mirrors.aliyun.com/alpine/v3.10/main/ > /etc/apk/repositories && echo http://mirrors.aliyun.com/alpine/v3.10/community/ >> /etc/apk/repositories
RUN apk --no-cache add tzdata  && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apk --update add curl bash ttf-dejavu && rm -rf /var/cache/apk/*
RUN mkdir -p /app
ARG JAR_FILE
ENV PROFILE=master
COPY ${JAR_FILE} /app/app.jar
ENTRYPOINT ["java","-jar","/app/app.jar","--spring.profiles.active=${PROFILE}"]